import http from "@/http/index";
import useMenu from "@/hooks/useMenu";

export default class MenuApi {
  static getAllMenuTreeList():Promise<HttpType.ResponseData<Array<UserType.MenuInfo>>>  {
    return http.get("/Menu/findAllMenu");
  }
  static getRandomMenuId():Promise<HttpType.ResponseData<string>>  {
    return http.get("/Menu/getRandomMenuId");
  }
  static saveMenuTreeData(data:{menusTreeData:Array<UserType.MenuInfo>}):Promise<HttpType.ResponseData<string>>  {
    return http({
      method:'post',
      url:'/Menu/saveMenus',
      data
    })
  }
}